<!DOCTYPE html>
<html>
<head>
    <link rel="shortcut icon" href="../images/icon/snow.ico" type="image/x-icon" />
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台登录| Log in</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/AdminLTE.min.css" rel="stylesheet">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="admin_index.html"><b>后台登</b>录</a>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        <p class="login-box-msg">后台登录</p>

        <form method="post" id="loginForm">
            <div class="form-group has-feedback">
                <input name="username" type="username" class="form-control" placeholder="Username">
                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" class="form-control" placeholder="Password" name="passBefore" id="passBefore">
                <input type="hidden" name="password" id="password"/>
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <div class="checkbox icheck">
                        <label>
                            <input type="checkbox"> Remember Me
                        </label>
                    </div>
                </div>
                <!-- /.col -->
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat" onclick="login()">Sign In</button>
                </div>
                <!-- /.col -->
            </div>
        </form>
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->
</body>
<script src="/js/bootstrap.min.js"></script>

<script src="lib/jquery/dist/jquery.min.js"></script>
<script src="/lib/axios/dist/axios.js"></script>
<script src="//cdn.bootcss.com/blueimp-md5/2.3.1/js/md5.min.js"></script>
<script src="https://cdn.bootcss.com/iCheck/1.0.2/icheck.min.js"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });

    function login() {
        var b,a = document.forms[0];
        a.action = "/doLogin";
        b = document.getElementById("passBefore").value;
        document.getElementById("password").value=md5(b);
        a.method="post";
        a.submit()
    }
</script>
</html>
